import request from '../request/request';



interface TeamInfo {
        Id : number
        Name : string
        Message : string
        Role : string
}

const url="/team_info"
export default class TeamInfoApi  {
     // 查询
    static getList = () => {
    return request({
        url: '/v1/'+url,
        // params: {current, size},
        method: 'GET',
    })
}

    // 查询一个
    static getOne = (id:string) =>{
        return request({
            url: '/v1/'+url+'/'+id,
            method: 'GET',
        })
    }

    // 修改
    static update=(data:TeamInfo)=>{
        return request({
            url: '/v1/'+url,
            data: data,
            method: 'PUT',
        })
    }

    // 添加
    static add=(data:TeamInfo)=>{
        return request({
            url: '/v1/'+url,
            data: data,
            method: 'POST',
        })
    }

    // 删除
    static delete=(id:string)=>{
        return request({
            url: '/v1/'+url+'/'+id,
            method: 'DELETE',
        })
    }
}